﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Input;

namespace DELVE_GAME.ViewStructure
{
    class MenuItem : MenuComponent
    {
        GameAction action;
        bool selected;

        public override void update()
        {
            base.update();
            if (selected)
            {
                action.doAction();
            }
        }

        public void setSelected(bool selected)
        {
            this.selected = selected;
        }
        /*public override void keyPressed( Keys key )
        {
            if (key == Keys.Enter)
            {
                doEnterAction();
            }
        }

        public void setEnterAction( GameAction action )
        {
            enterAction = action;
        }

        private void doEnterAction()
        {
            if (enterAction != null)
            {
                enterAction.doAction();
            }
        }*/

        internal void setAction(GameAction action)
        {
            this.action = action;
        }

    }
}
